#pragma once
#include <Windows.h>
#include <iostream>
#include "ImgAlgorithm.h"

#define USE_BAUDRATE	CBR_115200

HANDLE OpenComm(std::string comName);
DWORD SendData(HANDLE hComm, uint8_t*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  pdata, uint16_t dataLen);
DWORD ReceiveData(HANDLE hComm, uint8_t* pdata, uint16_t readLen);
void CloseComm(HANDLE hComm);
bool SendImgData(HANDLE hComm, ImgData imgData);
void ClearCommCache(HANDLE hComm);
